package com.zlx.redismessage.task;

import java.util.TimerTask;

/**
 * @ClaseName: ScheduleTask
 * @Description: 定时任务抽象类(父类) 具体执行方法请继承该类，然后重写run方法
 * @author gaoYuan
 * @Date: 2022/5/6 17:30
 */
public abstract class ScheduleTask extends TimerTask implements Runnable {

    private String id;

    private Object param;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public Object getParam() {
        return param;
    }

    public void setParam(Object param) {
        this.param = param;
    }

    public ScheduleTask(String id) {
        this.id = id;
    }

    public ScheduleTask(Object param) {
        this.param = param;
    }

    @Override
    public abstract void run();
}

